Ext.namespace("org.microsite.host");

Host.prototype.getType = function() {return 'Host';};

org.microsite.util.ViewRegistry.add(new org.microsite.util.ViewHelper({
    type : Host,
    service : HostRemote,
    editor : org.microsite.host.HostEditor,
    template : new Ext.XTemplate('<table border="0" cellspacing="5">',
            '<tr><td><b>Name</b></td><td>{name}</td></tr>',
            '<tr><td><b>Description</b></td><td>{description}</td></tr>',
            '<tr><td><b>IP</b></td><td>{ip}</td></tr>',
            '<tr><td><b>URL</b></td><td>{url}</td></tr>',
            '<tr><td><b>OS</b></td><td>{os} {osVersion}</td></tr>',
            '<tr><td><b>JVM</b></td><td>{jvm}<br/>{jvmPath}</td></tr>',
            '<tr><td><b>Domain</b></td><td>{domain}</td></tr>',
            '<tr><td><b>Admin</b></td><td>{admin}</td></tr>',
            '</table>'),
    fields : [{name:'id'},{name:'name'},{name:'description'},{name:'ip'},{name:'url'},
                {name:'os'},{name:'osVersion'},{name:'jvm'},{name:'jvmPath'},{name:'domain'},{name:'admin'}],
    
    getChildTypes : function(data) {
        return [Server];
    },
    parentNodes: [{
        name : 'group',
        type : Group
    }]
}));
